package org.mybatis.caches.memcached;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by limiemie on 15/3/21.
 */
public class MemcachedClientManager {

    public static MemcachedClientWrapper client;

    public static Set<String> targetKeySet = new HashSet<>();

    public synchronized static MemcachedClientWrapper getClient(){

        if(client == null){
            client = new MemcachedClientWrapper();
        }
        return client;
    }

    public synchronized static void shutdown(){
        if(client != null){
            client.shutdown();
        }
    }

}
